 cmake_minimum_required(VERSION 3.1.0)

 project(helloworld VERSION 1.0.0 LANGUAGES CXX)

 set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)

 set(CMAKE_AUTOMOC ON)
 set(CMAKE_AUTORCC ON)
 set(CMAKE_AUTOUIC ON)
#set(QWT_INCLUDE_DIR  D:/msys64/mingw64/include/qwt-Qt6)
#include(findqwt.txt)

find_package(Qt6 COMPONENTS Sql SerialPort PrintSupport Widgets REQUIRED)
include_directories(src D:/msys64/mingw64/include/qwt-qt6)
#include_directories(QWT_INCLUDE_DIR)
get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
foreach(dir ${dirs})
  message(STATUS "dir='${dir}'")
endforeach()
add_executable(hello
    src/dlgabout.cpp 
    src/ApplicationWindow.cpp 
    src/delegate.cpp 
    src/card9111.cpp 
    src/dblDele.cpp 
    src/editablesqlmodel.cpp 
    src/main.cpp 
    src/Madlglogon.cpp 
    src/dbdata.cpp 
    src/muser.cpp 
    src/mymethod.cpp 
    src/dlgstandards.cpp 
    src/cmysig.cpp 
    src/mytableview.cpp 
    src/dlgcard.cpp 
    src/DlgSetup.cpp 
    src/hstatus.cpp 
    src/chanelvolt.cpp 
    src/trackdelegate.cpp 
    src/vstatus.cpp 
    src/dlgtp.cpp 
    src/mytp.cpp 
    src/dlgmethod.cpp 
    src/mcsy.cpp 
    src/ccard.cpp 
    src/Utils.cpp 
    src/dlgtableedit.cpp 
    src/DlgOpenSample.cpp 
    src/printview.cpp 
    src/Mylog.cpp 
    src/MyThread.cpp 
    src/cmysig2.cpp 
    src/mcsythread.cpp 
    src/mcsytimer.cpp 
    src/vstatuscolor.cpp 
    src/channelad.cpp 
    src/widgetdelegate.cpp
    src/dlglogon.ui 
    src/ApplicationWindow.ui 
    src/dlgSerial.ui 
    src/dlgabout.ui 
    src/ApplicationWindow.ui 
    src/dlgStandards.ui 
    src/DlgCard.ui 
    src/DlgSetup.ui 
    src/dlgtp.ui 
    src/DlgMethod.ui 
    src/dlgTableEdit.ui 
    src/dlgOpenSample.ui
    res1.qrc
 )
set_target_properties(hello
    PROPERTIES
    LINK_FLAGS -no-pie
    )
target_link_libraries(hello Qt6::Widgets Qt6::Sql Qt6::SerialPort Qt6::PrintSupport qwt-Qt6)
